package threadTesting;

import util.Vector;

/**
 * Created by IntelliJ IDEA.
 * User: s32465
 * Date: 09.11.2010
 * Time: 18:34:31
 * To change this template use File | Settings | File Templates.
 */
public class WriteVectorThread extends Thread{
    private Vector vector;
    public WriteVectorThread(Vector vector){
        this.vector = vector;
    }
    
    public void run(){
        for (int i = 0; i < this.vector.length(); i++) {
            float value = (float)Math.random();
            System.out.println("Write: "+ value+" to position "+ i);
             this.vector.setElement(i,value);
        } 

    }
}
